import java.util.function.Predicate;
import java.util.stream.Stream;

public class Test {
    public static void main(String[] args) {
        Stream<Integer> s = Stream.of(1, 2, 3, 4, 5);
        // Stream<Integer> s2 = s.filter(x -> x % 2 != 0);
        // s2.forEach(System.out::println);
        Predicate<Integer> f1 = x-> x%2 ==0;
        Stream<Integer> s3 = s.filter(f1);
        s3.forEach(System.out::println);
    }
}
